home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / encore.lha / encore / tsystem / max_start_t.s < prev    next >
Text File  |  1988-03-09  |  1KB  |  43 lines

  1.         .globl big_bang   
  2.         .globl the_slink
  3.         .globl _start_t
  4.         .globl interrupt_dispatcher
  5.         .globl _nlistone
  6.         .text
  7.                        
  8. descriptor:
  9.         .double fake_module_table
  10. fake_module_table:
  11.         .double the_slink           # Static Base
  12.         .double 0                   # Link Base
  13.         .double really_start_t      # Program Base
  14.         .double 0                   # (reserved by N32 for future use)
  15. _start_t:                  
  16.         cxpd descriptor             # so MOD will point to the fake table
  17. really_start_t:
  18.         adjspd $-8                  # pop what cxpd pushed
  19.         addr interrupt_handler,r0  # so big_bang can find interrupt_xenoid
  20.         addr big_bang,r2            # P register gets the closure
  21.         movd -2(r2),r7              # TP gets the template
  22.         jump 0(r7)      
  23. _nlistone:
  24.  
  25. interrupt_handler:
  26.     movd r7,tos
  27.     movd r6,tos
  28.     movd r5,tos
  29.     movd r4,tos
  30.     movd r3,tos
  31.     movd 24(sp),r0
  32.     movd 32(sp),r3
  33.         addr interrupt_dispatcher,r2
  34.         movd -2(r2),r7              # TP gets the template
  35.         jsr  0(r7)
  36.     movd tos,r3
  37.     movd tos,r4
  38.     movd tos,r5
  39.     movd tos,r6
  40.     movd tos,r7
  41.         ret  $0
  42.  
  43.